TrackTimeToMediaTime
TheTrackTimeToMediaTime
function allows your application to convert a track's time value to a time value that is appropriate to the track's media using the track's edit list. You specify the track's time in the movie's time coordinate system.
pascal TimeValue TrackTimeToMediaTime (TimeValue value, Track theTrack);
value
- Specifies the track's time value; must be expressed in the time scale of the movie that contains the track.
theTrack
- Specifies the track for this operation. Your application obtains this track identifier from such Movie Toolbox functions as
NewMovieTrack
andGetMovieTrack
(described on page 2-136 and page 2-188, respectively).DESCRIPTION
The Movie Toolbox returns a value that is in the media's time coordinate system.You can use the
TrackTimeToMediaTime
function to determine whether a specified track edit is empty. If the track time corresponds to empty space, this function returns a value of -1.The
TrackTimeToMediaTime
function maps the track time through the track's edit list to come up with the media time. This time value contains the track's time value according to the media's time coordinate system. If the time you specified lies outside of the movie's active segment or corresponds to empty space in the track, theTrackTimeToMediaTime
function returns a value of -1.ERROR CODES
invalidTrack -2009 This track is corrupted or invalid